package xxx;

public class Taxes {
    static final int a = 0, b = 500, c = 2000, d = 5000, e = 20000, f = 40000, g = 60000, h = 80000, i = 100000;
    static final double wubai = b * 0.05;
    static final double liangqian = wubai + (c - b) * 0.1 - 25;
    static final double wuqian = liangqian + (d - c) * 0.15 - 125;
    static final double liangwan = wuqian + (e - d) * 0.2 - 375;
    static final double siwan = liangwan + (f - e) * 0.25 - 1375;
    static final double liuwan = siwan + (g - f) * 0.3 - 3375;
    static final double bawan = liuwan + (h - g) * 0.35 - 6375;
    static final double shiwan = bawan  + (i - h) * 0.40 - 10375;
    public double Taxes(double s) {
        if (s - i > 0) {
            s = s - (s - i) * 0.45 - 15375 - shiwan;
        } else if (s - h > 0) {
            s = s - (s - h) * 0.4 - 10375 - bawan;
        } else if (s - g > 0) {
            s = s - (s - g) * 0.35 - 6375 - liuwan;
        } else if (s - f > 0) {
            s = s - (s - f) * 0.3 - 3375 - siwan;
        } else if (s - e > 0) {
            s = s - (s - e) * 0.25 - 1375 - liangwan;
        } else if (s - d > 0) {
            s = s - (s - d) * 0.2 - 375 - wuqian;
        } else if (s - c > 0) {
            s = s - (s - c) * 0.15 - 125 - liangqian;
        } else if (s - b > 0) {
            s = s - (s - b) * 0.1 - 25 - wubai;
        } else {
            s = s - s * 0.05;
        }
        return s;
    }
}
